apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: {{.Chart.Name}}-{{.Release.Namespace}}-role
rules:
- apiGroups: [ apps ]
  resources: [ deployments ]
  verbs: [ get, list, create, delete, update ]
- apiGroups: [ "" ] #  indicates the core API group
  resources: [ namespaces, services, secrets, persistentvolumeclaims, resourcequotas, limitranges ]
  verbs: [ get, list, create, delete, update ]
- apiGroups: [ networking.k8s.io ]
  resources: [ networkpolicies ]
  verbs: [ get, list, create, delete, update ]